#!/bin/sh

yo=`whoami`
colas=`ipcs -q | tr -s " \t" | grep "$yo 666" | cut -d\  -f2`
memorias=`ipcs -m | tr -s " \t" | grep "$yo 666" | cut -d\  -f2`
semaforos=`ipcs -s | tr -s " \t" | grep "$yo 666" | cut -d\  -f2`

for e in $colas; do
	ipcrm -q $e; \
done

for e in $memorias; do
	ipcrm -m $e; \
done

for e in $semaforos; do
	ipcrm -s $e; \
done

